package com.ingesup.ws.services;

import java.util.HashMap;
import java.util.Map;

import com.ingesup.ws.models.User;
import com.ingesup.ws.models.UserType;

public class Datas {

	public static final Map<Long, User> users;
	
	private static Long id = 0L;
	
	public static Long getUserId() {
		return id++;
	}
	
	static {
		
		users = new HashMap<>();
		
		User u = new User();
		u.setFirstName("Cersei");
		u.setLastName("Lannister");
		u.setEmail("cersei.lannister@got.com");
		u.setPassword("jaime");
		u.setAddress("Chateau de Port Royal");
		u.setPhone("0615234879");
		u.setType(UserType.PRIVATE);	
		users.put(getUserId(), u);
		
		u = new User();
		u.setFirstName("Jaime");
		u.setLastName("Lannister");
		u.setEmail("jaime.lannister@got.com");
		u.setPassword("wincest");
		u.setAddress("Somewhere over the rainbow");
		u.setPhone("0154326987");
		u.setType(UserType.PROFESSIONAL);
		users.put(getUserId(), u);
		
		u = new User();
		u.setFirstName("Jon");
		u.setLastName("Snow");
		u.setEmail("jon.snow@got.com");
		u.setPassword("igotlaid");
		u.setAddress("La garde de nuit, Le Mur");
		u.setPhone("0105789643");
		u.setType(UserType.SUPPLIER);
		users.put(getUserId(), u);
	}

}
